import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standard_scence_health_three_entity.dart';

StandardScenceHealthThreeEntity $StandardScenceHealthThreeEntityFromJson(Map<String, dynamic> json) {
  final StandardScenceHealthThreeEntity standardScenceHealthThreeEntity = StandardScenceHealthThreeEntity();
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    standardScenceHealthThreeEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    standardScenceHealthThreeEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    standardScenceHealthThreeEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    standardScenceHealthThreeEntity.createDate = createDate;
  }
  final String? date = jsonConvert.convert<String>(json['date']);
  if (date != null) {
    standardScenceHealthThreeEntity.date = date;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    standardScenceHealthThreeEntity.deleted = deleted;
  }
  final String? environmentDetection = jsonConvert.convert<String>(json['environmentDetection']);
  if (environmentDetection != null) {
    standardScenceHealthThreeEntity.environmentDetection = environmentDetection;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    standardScenceHealthThreeEntity.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    standardScenceHealthThreeEntity.name = name;
  }
  final String? occupationalHealthExamination = jsonConvert.convert<String>(json['occupationalHealthExamination']);
  if (occupationalHealthExamination != null) {
    standardScenceHealthThreeEntity.occupationalHealthExamination = occupationalHealthExamination;
  }
  final String? occupationalHealthTraining = jsonConvert.convert<String>(json['occupationalHealthTraining']);
  if (occupationalHealthTraining != null) {
    standardScenceHealthThreeEntity.occupationalHealthTraining = occupationalHealthTraining;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    standardScenceHealthThreeEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    standardScenceHealthThreeEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    standardScenceHealthThreeEntity.updateDate = updateDate;
  }
  return standardScenceHealthThreeEntity;
}

Map<String, dynamic> $StandardScenceHealthThreeEntityToJson(StandardScenceHealthThreeEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['date'] = entity.date;
  data['deleted'] = entity.deleted;
  data['environmentDetection'] = entity.environmentDetection;
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['occupationalHealthExamination'] = entity.occupationalHealthExamination;
  data['occupationalHealthTraining'] = entity.occupationalHealthTraining;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension StandardScenceHealthThreeEntityExtension on StandardScenceHealthThreeEntity {
  StandardScenceHealthThreeEntity copyWith({
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? date,
    String? deleted,
    String? environmentDetection,
    String? id,
    String? name,
    String? occupationalHealthExamination,
    String? occupationalHealthTraining,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return StandardScenceHealthThreeEntity()
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..date = date ?? this.date
      ..deleted = deleted ?? this.deleted
      ..environmentDetection = environmentDetection ?? this.environmentDetection
      ..id = id ?? this.id
      ..name = name ?? this.name
      ..occupationalHealthExamination = occupationalHealthExamination ?? this.occupationalHealthExamination
      ..occupationalHealthTraining = occupationalHealthTraining ?? this.occupationalHealthTraining
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
